Release 10.1A: OpenEdge Development:
.NET Open Clients
Passing DATASET and DATASET-HANDLE parameters
This section describes mapping 4GL ProDataSets to ADO.NET DataSets, using the
DATASETandDATASET-HANDLEparameters.Progress 4GL procedures can pass
DATASETorDATASET-HANDLEparameters to an AppServer. This is a convenient and efficient way to pass relational data between the client and the AppServer code. The .NET Open Client environment provides the same capability using an ADO.NET Dataset. A .NET Open Client passes a 4GLDATASETparameter using an ADO.NET strongly typed DataSet object that is generated by ProxyGen and mapped to the specified ProDataSet. This strongly typed DataSet object inherits from the standard ADO .NETSystem.Data.DataSetclass.
DATASET-HANDLEparameters allow the transfer of dynamic ProDataSets between Open Clients and the AppServer, without requiring a complete, static definition of the ProDataSet on each side of the transfer (as withDATASETparameters). A .NET Open Client passes a 4GLDATASET-HANDLEparameter using an ADO.NET DataSet object,System.Data.DataSet.For each unique static ProDataSet (
DATASETparameter), ProxyGen generates a strongly typed DataSet class,TypedDataSet.cs.TypedDataSetis the name of the static ProDataSet in the 4GL procedure, appended withDataSet. When comparing the static definitions of two ProDataSets, the name of the ProDataSet and the member buffers do not need to match for the ProDataSets to map to a single ADO .NET DataSet. However, field names, types, and indexes do need to match. (This differs from the Progress 4GL in which field names and indexes do not need to match.) For example, in a procedure with a static ProDataSetCustOrderDS,TypedDataSetisCustOrderDSDataSet. Each temp-table in the ProDataSet is created as a DataTable within the DataSet class. If other ProDataSet parameters in other methods in the proxy share the same schema, ProxyGen does not create additional strongly typed DataSet classes but uses the same strongly typed DataSet class for these methods. The name of the ProDataSet parameter does not matter when comparing the schema of ProDataSet parameters.Also, if ProxyGen detects two or more ProDataSet parameters with the same name but different schemas, ProxyGen creates multiple strongly typed DataSet classes, one for each unique schema. ProxyGen appends a unique number to the end of the DataSet name, to create unique class names. For example, if multiple procedures define a static ProDataSet
CustOrderDS, each with a different schema,TypedDataSetcan beCustOrderDSDataSet,CustOrderDS2DataSet, and so on.All strongly typed DataSet classes are defined in the following namespace:
where
namespaceis the namespace you optionally entered on the .NET tab of the Generate dialog box in ProxyGen. (See the "Namespace for proxy objects" section.)Strongly typed DataSet objects inherit from
Progress.Open4GL.ProDataSet, which in turn inherits fromSystem.Data.DataSet.This section covers the following topics:
|
Copyright © 2005 Progress Software Corporation www.progress.com Voice: (781) 280-4000 Fax: (781) 280-4095 |